package com.chpro.scsw.dao.impl;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class JdImageDao extends PcBeseDaoImpl {
	public static void main(String[] args){
		JdImageDao jdImageDao = new JdImageDao();
		
		//得到煎蛋网页数
		String pageUrl = "http://jandan.net/ooxx/page-1140#comments";
		String pageRegular = ".cp-pagenavi>.next-comment-page";
		Integer pageCount = 0;
		pageCount = jdImageDao.queryPageCount(pageUrl, pageRegular);
		System.out.println(pageCount);
		
		//得到图片列表
		List<Map<String,String>> pageList = new ArrayList<Map<String,String>>();
		String listUrl = "http://jandan.net/ooxx/page-";
		String listContentRegular = ".commentlist>.row";
		Map<String,String> listMap = new HashMap<String,String>();
		listMap.put("imgUrl", "p>img");
		pageList = jdImageDao.queryList(listUrl,1139,1139,listContentRegular, listMap);
		System.out.println(pageList);
	}
}
